package com.example.springdemo.service;

import com.example.springdemo.domain.User;
import org.springframework.beans.factory.FactoryBean;

//@Service("ayuan") // User ? UserService
// MapperFactoryBean
public class UserService implements FactoryBean<User> {
    @Override
    public User getObject() throws Exception {
        User user = new User("", 1);
        user.name = "阿苑";
        user.age = 23;
        return user;
    }

    @Override
    public Class<?> getObjectType() {
        return User.class;
    }
}
